<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/inventoryinfo/warehouse_location/q_warehouse_location.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/inventoryinfo/warehouse_location/q_warehouse_location.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Location_id',
                footer: "Foots",
                cnName: '库位管理',
                name: 'warehouse_location/q_warehouse_location',
                url: "/q_warehouse_location/",
                sortName: "WHSE_no"
            });
            const editFormFields = ref({"WHSE_no":"","WHSE_name":"","Item_num":"","Remark":""});
            const editFormOptions = ref([[{"title":"库位编码","field":"WHSE_no","disabled":true},
                               {"title":"库位名称","required":true,"field":"WHSE_name","disabled":true},
                               {"title":"商品数量","field":"Item_num","disabled":true,"type":"text"}],
                              [{"title":"备注","field":"Remark","type":"text"}]]);
            const searchFormFields = ref({"WHSE_no":"","WHSE_name":"","CreateDate":""});
            const searchFormOptions = ref([[{"title":"库位编码","field":"WHSE_no","type":"like"},{"title":"库位名称","field":"WHSE_name","type":"like"},{"title":"创建时间","field":"CreateDate","type":"datetime"}]]);
            const columns = ref([{field:'Location_id',title:'ID',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'WHSE_no',title:'库位编码',type:'string',width:110,readonly:true,align:'left',sort:true},
                       {field:'WHSE_name',title:'库位名称',type:'string',link:true,width:110,readonly:true,require:true,align:'left'},
                       {field:'Item_num',title:'商品数量',type:'int',width:80,readonly:true,align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'AuditDate',title:'审核时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'AuditStatus',title:'审核状态',type:'int',bind:{ key:'audit',data:[]},width:110,hidden:true,align:'left'},
                       {field:'AuditID',title:'审核人员id',type:'int',width:110,hidden:true,align:'left'},
                       {field:'Auditor',title:'审核人员',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateID',title:'创建人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人员',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Modifyer',title:'修改人员',type:'string',width:120,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true}]);
            const detail = ref({
                cnName: "库位管理明细",
                table: "q_warehouse_locationList",
                columns: [{field:'Location_list_id',title:'ID',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'WHSE_no',title:'仓库编码',type:'string',width:110,readonly:true,edit:{type:''},align:'left',sort:true},
                       {field:'WHSE_name',title:'仓库名称',type:'string',bind:{ key:'仓库',data:[]},width:220,readonly:true,edit:{type:'cascader'},align:'left'},
                       {field:'Item_sub',title:'商品编号',type:'string',width:110,edit:{type:''},require:true,align:'left'},
                       {field:'Item_name',title:'商品名称',type:'string',width:220,edit:{type:''},align:'left'},
                       {field:'Inventory_min',title:'最小库存',type:'float',width:110,edit:{type:'text'},align:'left'},
                       {field:'Inventory_max',title:'最大库存',type:'float',width:110,edit:{type:'text'},align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:220,edit:{type:''},align:'left'},
                       {field:'AuditDate',title:'审核时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'AuditStatus',title:'审核状态',type:'int',width:110,hidden:true,align:'left'},
                       {field:'AuditID',title:'审核人员id',type:'int',width:110,hidden:true,align:'left'},
                       {field:'Auditor',title:'审核人员',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateID',title:'创建人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人员',type:'string',width:100,hidden:true,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Modifyer',title:'修改人员',type:'string',width:120,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'Location_id',title:'父级ID',type:'guid',width:110,hidden:true,align:'left'}],
                sortName: "CreateDate",
                key: "Location_list_id"
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
